import java.util.Scanner;

public class Java008 {
    public static void main(String[] args) {
        int num1,i,num2=0,all=0,a;
        Scanner sc=new Scanner(System.in);
        System.out.println("input:how mach");
        num1=sc.nextInt();
        System.out.println("input:a");
        a=sc.nextInt();
        for(i=1;i<=num1;i++){
            num2=num2*10+a;
            all+=num2;
        }
        System.out.println(all);
    }
}
